<?
        require_once dirname(__FILE__) . '/../inc/functions.php';
        require_once dirname(__FILE__) . '/data.php';
        $section='Users';
        $result = GetAll($_REQUEST['User_id']);
?>

<!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" href="../inc/site.css" />
        <title>Users</title>
        <style type="text/css">
                        .new-row { background: #CC0; }
                </style>
    </head>
    
    <body>
<div id="container">
<div id="logo"><img src="../logo.png" alt="Logo" height="117" width="619" /></div>
<div id="nav"> 
<ul>
	<li><a href="../home.php">Home</a></li>
	<li><a href="../products.php">Products</a></li>
	<li><a href="../Users/index.php">Users</a></li>
	<li><a href="../contact.php">Contact Us</a></li>
</ul>
</div>
<div id="content">
<a href="http://www.webdevfoundations.net/scripts/cart.asp?view=yes"><img class="floatright" src="../view.jpg" alt="Shopping Cart" width="98px" height="28px" /></a>
        <h2>Contact Methods</h2>
        <a href="edit.php">Add Contact Method</a>
        <table>
                <tr>
                <th>User</th>
                <th>Type</th>
                <th>Value</th>
            </tr>
                        <? while($rs = $result->fetch_assoc()){ ?>
                <tr class="<?= $_REQUEST['new_id']==$rs['id'] ? 'new-row' : '' ?>">
                        <td>
                                                <?=$rs['FirstName']?> <?=$rs['LastName']?>
                     </td>
                        <td><?=$rs['Name']?></td>
                    <td><?=$rs['Value']?></td>
                    <td>
                        <a href="../ContactMethods/edit.php?id=<?=$rs['id']?>">Edit</a>
                        <a href="../ContactMethods/delete.php?id=<?=$rs['id']?>">Delete</a>
                    </td>
                </tr>
            <? } ?>
        </table>
</div>
<div id="footer"><i>Copyright &copy; 2011 E-commerce site</i><br />
<a href="mailto:npratt3284@gmail.com">npratt3284@gmail.com</a></div>

</div>
    </body>
</html>

<? //$conn->close(); ?>
